---
import { PFSearch } from 'astro-pure/components/pages'
import { Button } from 'astro-pure/user'
import PageLayout from '@/layouts/BaseLayout.astro'
import { integ } from '@/site-config'

const meta = {
  description: 'Search relative posts of the whole blog',
  title: 'Search'
}
---

<PageLayout {meta}>
  <Button title='返回' href='/blog' variant='back' />
  <main class='mt-6 lg:mt-10'>
    <div id='content-header' class='animate'>
      <h1 class='mb-6 text-3xl font-medium'>搜索</h1>
    </div>

    <div id='content' class='animate'>
      {
        integ.pagefind ? (
          <>
            <p>输入搜索词或短语来搜索博客。</p>
            <PFSearch />
          </>
        ) : (
          <p>Pagefind 已禁用。</p>
        )
      }
    </div>
  </main>
</PageLayout>
